Page({
  data: {
    noticeDetail: []
  },
  onLoad({ id }) {
    this.getnoticeDetail(id)
  },
  async getnoticeDetail(id) {
    const { code, data: noticeDetail } = await wx.http.get('/announcement/' + id)
    if (code !== 10000) return wx.utils.toast('获取页面数据失败')
    this.setData({
      noticeDetail: noticeDetail
    })
  }
})